﻿{% extends "app/layout.html" %}
{% load pagination_tags %}

{% block content %}

<div class="page-header">
    <h4>{{ title }} </h4>
    <h5>{{ day }} {{ user }}</h5>
</div>
{% if d_diary_list %}
<div class="panel panel-default">
    <p>开发日志</p>
</div>
<div class="panel panel-body">
    <div class="table-responsive">
        {% autopaginate d_diary_list 10 %}
        <table class="table small">
            <thead>
            <tr>
                <th></th>
                <th>类型</th>
                <th>来源</th>
                <th>完成</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            {% for item in d_diary_list %}
            <tr>
                <td><input type="checkbox" /></td>
                <td>{{ item.job_type }}</td>
                <td>{{ item.desc }}</td>
                <td>{{ item.class_name }}</td>
                <td>{{ item.doc }}</td>
                <td><button type="button" class="btn btn-xs pull-right" onclick="/edit_d_diary/ {{ item.id }}" >编辑</button></td>
                <td><button type="button" class="btn btn-xs pull-right" onclick="{ url 'remove_d_diary' {{ item.id }} }">删除</button></td>
            </tr>
            {% endfor %}
            </tbody>
        </table>
        {% paginate %}
    </div>
</div>
{% endif %}

{% if m_diary_list %}
<div class="panel panel-title">
    <p>维护日志</p>
</div>
<div class="table-responsive">
    {% autopaginate m_diary_list 10 %}
    <table class="table small">
        <thead>
        <tr>
            <th></th>
            <th>编号</th>
            <th>类型</th>
            <th>客户单位</th>
            <th>产品</th>
            <th>联系人</th>
            <th>联系方式</th>
            <th>完成</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {% for item in m_diary_list%}
        <tr>
            <td><input type="checkbox" /></td>
            <td>{{ item.m_id }}</td>
            <td>{{ item.m_type}}</td>
            <td>{{ item.client}}</td>
            <td>{{ item.product}}</td>
            <td>{{ item.contracts}}</td>
            <td>{{ item.contract_information}}</td>
            <td>{{ item.resolved}}</td>
            <td><button type="button" class="btn btn-xs pull-right" onclick="/edit_m_diary/ {{ item.id }}" >编辑</button></td>
            <td><button type="button" class="btn btn-xs pull-right" onclick="{ url 'remove_m_diary' {{ item.id }} }">删除</button></td>
        </tr>
        {% endfor %}
        </tbody>
    </table>
    {% paginate %}
</div>
{% endif %}

{% endblock %}
